package com.example.userservice.mapper;

import com.example.userservice.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    User findById(@Param("userId") Long userId);

    User findByUsername(@Param("username") String username);

    User findByEmail(@Param("email") String email);

    List<User> findAll();

    int insert(User user);

    int update(User user);

    int deleteById(@Param("userId") Long userId);

    List<User> findByRole(@Param("roleCode") String roleCode);
}